<script>
$(document).ready(function() {
  $('.tooltip').simpletooltip();
});
</script>
<input type="hidden" id="razred_id" value="<?php echo $razred->getId() ?>" />
<input type="hidden" id="predmet_id" value="<?php echo $predmet->getId() ?>" />
<input type="hidden" id="period" value="<?php echo $period ?>" />
<table width="1000" border="2" cellspacing="0" cellpadding="0">
  <tr>
    <th>Rbr</th>
    <th style="padding-left:5px;">Prezime i ime</th>
    <th style="padding-left:5px;">Prvo polugodište</th>
    <th style="padding-left:5px;">Drugo polugodište</th>
    <th style="text-align:center;">Ocena</th>
    <th style="text-align:center;">Obrazloženje</th>
  </tr>

  <?php
  $tabindex = 1;
  foreach($uceniks as $ucenik)
  {?>
    <tr>
      <td style="padding-left:1px; text-align: center;"><?php echo $ucenik->getRedBr() ?></td>
      <td style="padding-left:5px;"><?php echo $ucenik->joinIme() ?></td>
      <td style="padding-left:5px;">
        <?php
        if(isset($ocenas[$ucenik->getId()][1]))
        {
            echo Dnevnik::oceneGraf($ocenas[$ucenik->getId()][1], $ucenik->getRazredId(), $razred->getId(), 1);
        }
        ?>
      </td>
      <td style="padding-left:5px;">
        <?php
        if(isset($ocenas[$ucenik->getId()][2]))
        {
            echo Dnevnik::oceneGraf($ocenas[$ucenik->getId()][2], $ucenik->getRazredId(), $razred->getId(), 1);
        }
        ?>
      </td>
      <td style="text-align:center;"><input maxlength="1" size="1" type="text" class="input_ocena" id="oc_<?php echo $ucenik->getId() ?>" tabindex="<?php echo $tabindex++ ?>" /></td>
      <td style="text-align:center; padding: 1px; 3px;"><input type="text" class="opis_ocena" id="op_<?php echo $ucenik->getId() ?>" tabindex="<?php echo $tabindex++ ?>" />
        <input type="hidden" id="rid_<?php echo $ucenik->getId() ?>" value="<?php echo $ucenik->getRazredId()?>" />
      </td>
    </tr>
  <?php }?>

</table>

<div style="margin-left: 450px;margin-top: 5px;">
  <a id="dugme" onclick="grupni_unos(); return false;" href="javascript: void(0)" class="button"><span>Unesi</span></a>
</div>